<?php

class Application_Model_DbTable_Token extends Zend_Db_Table_Abstract
{

    protected $_name = 'Token';
    protected $_primary = 'id';
    
    
	public function createToken($email, $token)
 	{
 		$data = array(
	   		'Email' => $email,
	   		'Token' => $token,	   		
  		);
  		return $this->insert($data);		
 	}

 	public function getToken($email)
    {
     	$row = $this->fetchRow("Email = '" . $email."'");         
  		if (!$row) {
   			return null;
  		}
  		return $row->toArray();
    }


}

